home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
winsock
/
ircii2-6.zip
/
SRC\IRCII-2.6\BSDINSTA
< prev
next >
Wrap
Text File
|
1993-11-07
|
1KB
|
91 lines
#! /bin/sh
#
# @(#)install.sh 4.5 (Berkeley) 10/12/83
#
cmd=/bin/mv
strip=""
chmod="/bin/chmod 755"
chown=""
chgrp=""
while true ; do
case $1 in
-s ) strip="/bin/strip"
shift
;;
-c ) cmd="/bin/cp"
shift
;;
-m ) chmod="/bin/chmod $2"
shift
shift
;;
-o ) chown="/etc/chown -f $2"
shift
shift
;;
-g ) chgrp="/bin/chgrp -f $2"
shift
shift
;;
-d ) cmd="/bin/mkdir"
shift
;;
* ) break
;;
esac
done
if test ! ${2-""}; then
echo "install: no destination specified"
exit 1
fi
if test ${3-""}; then
echo "install: too many files specified -> $*"
exit 1
fi
if test $1 = $2 -o $2 = .; then
echo "install: can't move $1 onto itself"
exit 1
fi
case $cmd in
/bin/mkdir )
file=$2/$1
;;
* )
if test '!' -f $1; then
echo "install: can't open $1"
exit 1
fi
if test -d $2; then
file=$2/$1
else
file=$2
fi
/bin/rm -f $file
;;
esac
case $cmd in
/bin/mkdir )
if test ! -d "$file"; then
$cmd $file
fi
;;
* )
$cmd $1 $file
if test -n "$strip"; then
$strip $file
fi
;;
esac
if test -n "$chown"; then
$chown $file
fi
if test -n "$chgrp"; then
$chgrp $file
fi
$chmod $file
exit 0